<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>用户注册页面</title>
</head>



<body>
        <script>

                /*输入完用户名后校验只能是"admin"，否则弹框提示错误*/
                function login() {
                    var userName = document.getElementById("uname").value;
                    console.log(userName);
                    if(userName != "admin"){
                        alert("用户账号错误!");
                        return false;
                    } else{
                        alert("注册成功!")
                        show_introduction();
                        return  true;
                    }
                }
             
                function show_introduction() {
                    var introduct = document.getElementById("intro").value;
                    alert("自我介绍: " + introduct);
                }
                                     
                                
        </script>

        <h3 style="text-align:center">注册页面</h3>
        <hr />
        <div style="margin-left: 35%">
            <form name = "register" action="#" onsubmit="return login()" >
            <table border="1px">
                <tr height="35px">
                    <td width="150px">用户名</td>
                    <td width="300px">
                        <input type="text" name="uname" id="uname" placeholder="请输入用户名" />
                    </td>
                </tr>
                <tr height="35px">
                    <td >密码</td>
                    <td>
                        <input type="password" name="pwd" id="pwd" placeholder="请输入密码" />
                    </td>
                </tr>
              
                <tr height="35px">
                    <td>性别</td>
                    <td>
                        男<input type="radio" name="sex" id="" value="1" />
                        女<input type="radio" name="sex" id="" value="0" />
                    </td>
                </tr>
                <tr height="35px">
                    <td>学历</td>
                    <td>
                        <input type="radio" name="degree" id="" value="0" />本科
                        <input type="radio" name="degree" id="" value="1" />专科
                    </td>
                </tr>
              
                <tr height="35px">
                    <td>自我介绍</td>
                    <td>
                        <textarea name="intro" id="intro" rows="8" cols="30" placeholder="请写下您的自我介绍"></textarea>
                    </td>
                </tr>
          
                <tr>
                    <td colspan="2" align="center">
                        <input type="submit" id="" value="注册"/>
                    </td>
                </tr>
            </table>
            </form>
        </div>


       
    </body>
</html>

